package com.dhcc.DRGsHosp.core.domain;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.openkoala.koala.commons.domain.KoalaLegacyEntity;

/**
 * 
 * @ClassName: Ward  
 * @Description ：    
 * @Date: 2018年7月23日 下午1:16:43  
 * @Author ChenHanlin 
 * @Version 3.1.0 DHC-DRG
 */
@Entity
@Table(name="T_WARD", schema = "DRGs")
public class Ward extends KoalaLegacyEntity {

	private static final long serialVersionUID = 6165557133209999388L;

	//WARD代码
	@Id
	@Column(name = "WARD_CODE", nullable = false)
	private String wardCode;
	
	//病区描述
	@Column(name = "WARD_DESC")
	private String wardDesc;
	
	//科室代码
	@Column(name = "PARDEP_CODE")
	private String depCode;
	
	//科室组代码
	@Column(name = "PARDEPGROUP_CODE")
	private String depGroupCode;
	
	//病区备注
	@Column(name = "WARD_RESUME")
	private String wardResume;
	
	@Column(name = "WARD_ORDER")
	private Integer wardOrder;
	
	@Transient
	private String depName;
	
	@Transient
	private String depGroupDesc;
	
	
	/**
	 * 
	 * @param wardCode
	 * @param wardDesc
	 * @param depCode
	 * @param depGroupCode
	 * @param wardResume
	 * @param depName
	 * @param depGroupDesc
	 */
	public Ward(String wardCode, String wardDesc,String wardResume, String depCode,
			String depName,Integer wardOrder) {
		super();
		this.wardCode = wardCode;
		this.wardDesc = wardDesc;
		this.depCode = depCode;
		this.wardResume = wardResume;
		this.depName = depName;
		this.wardOrder=wardOrder;
	}


	/**
	 * @return the wardCode
	 */
	public String getWardCode() {
		return wardCode;
	}

	/**
	 * @param wardCode the wardCode to set
	 */
	public void setWardCode(String wardCode) {
		this.wardCode = wardCode;
	}

	/**
	 * @return the wardDesc
	 */
	public String getWardDesc() {
		return wardDesc;
	}

	/**
	 * @param wardDesc the wardDesc to set
	 */
	public void setWardDesc(String wardDesc) {
		this.wardDesc = wardDesc;
	}
	/**
	 * @return the depCode
	 */
	public String getDepCode() {
		return depCode;
	}

	/**
	 * @param depCode the depCode to set
	 */
	public void setDepCode(String depCode) {
		this.depCode = depCode;
	}

	/**
	 * @return the depGroupCode
	 */
	public String getDepGroupCode() {
		return depGroupCode;
	}

	/**
	 * @param depGroupCode the depGroupCode to set
	 */
	public void setDepGroupCode(String depGroupCode) {
		this.depGroupCode = depGroupCode;
	}

	/**
	 * @return the wardResume
	 */
	public String getWardResume() {
		return wardResume;
	}

	/**
	 * @param wardResume the wardResume to set
	 */
	public void setWardResume(String wardResume) {
		this.wardResume = wardResume;
	}

	



	public Integer getWardOrder() {
		return wardOrder;
	}


	public void setWardOrder(Integer wardOrder) {
		this.wardOrder = wardOrder;
	}


	@Override
	public Serializable getId() {
		// TODO Auto-generated method stub
		return wardCode;
	}

	@Override
	public String[] businessKeys() {
		// TODO Auto-generated method stub
		return null;
	}

	/**
	 * 
	 */
	public Ward() {
		super();
		// TODO Auto-generated constructor stub
	}

	public String getDepName() {
		return depName;
	}

	public void setDepName(String depName) {
		this.depName = depName;
	}

	public String getDepGroupDesc() {
		return depGroupDesc;
	}

	public void setDepGroupDesc(String depGroupDesc) {
		this.depGroupDesc = depGroupDesc;
	}


	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((wardCode == null) ? 0 : wardCode.hashCode());
		return result;
	}


	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (getClass() != obj.getClass())
			return false;
		Ward other = (Ward) obj;
		if (wardCode == null) {
			if (other.wardCode != null)
				return false;
		} else if (!wardCode.equals(other.wardCode))
			return false;
		return true;
	}
	
	
}
